TABLE.XML_EXPORT Function

Syntax

C table.xml_export(C tablename ,C filename [,C fields [,C filter [,C order [,L silent [,L open ]]]]])

Arguments

tablename

The name of the table that will provide the data to export.

filename

The name of the XML file to create.

fields

Optional. Default = all fields. Comma delimited list of fields to take data from.

filter

Optional. Default = all records. An expression that selects records.

order

Optional. Default = record number order. An expression that orders the selected records

silent

Optional. Default = .F. Whether to display a confirmation message before exporting the data, or before overwriting Filename. .T. = Do not display a confirmation message. .F. = Display a confirmation message.

open

Optional. Default = .T. Whether to open Filename with the associated application. .T. = Open Filename. .F. = Do not open Filename.

Description

Exports data from a table to an XML file. Specify * to export all fields.

Discussion

The TABLE.XML_EXPORT() method exports data to an XML file.

Example

table.xml_export("customer", "c:\customer.xml", "*", "lastname > 'A'", "firstname", .f., .f.)

Parts of the xml file are included below.

CUSTOMER_ID 
             Character 
             8 
             0 
        
        
             FIRSTNAME 
             Character 
             20 
             0 
        
....
    
    
        
             00000047 
             Brad 
             James 
            
             (207) 555-9489 
            
             185 Albany St 
             12th Floor 
             Westbrook 
             ME 
             04092 
            
            
            
            
            
            
            
             True 
            
            
        
....

See Also